﻿using Camc.Quality.RecordTable.FormBase;
using Camc.Quality.RecordTable.FormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.RecordTable.FormEntity
{
    public class 电缆剥线试验记录表高频 : TableBase
    {
        public 电缆剥线试验记录表高频(int serialNum, Guid workStepEntityId, Guid processesEntityId, int sort, string fisrtDrawingNum, string toolUsed, string secondToolUsed, string recordItem)
        {
            SerialNum = serialNum;
            WorkStepEntityId = workStepEntityId;
            ProcessesEntityId = processesEntityId;
            Sort = sort;
            FisrtDrawingNum = fisrtDrawingNum;
            ToolUsed = toolUsed;
            SecondToolUsed = secondToolUsed;
            RecordItem = recordItem;
        }
        public override string FormName { get; protected set; } = "电缆剥线试验记录表高频";
        #region A4_图号
        public override string FisrtDrawingNum_DisplayName { get; protected set; } = "图号";
        public override bool FisrtDrawingNum_Show { get; protected set; } = true;
        #endregion
        #region 测量工具编号
        public override string ToolUsed_DisplayName { get; protected set; } = "测量工具编号";
        public override bool ToolUsed_Show { get; protected set; } = true;
        public override bool ToolUsed_Enable { get; protected set; } = true;
        public override int ToolUsed_Property { get; protected set; } = 2;
        #endregion
        #region A15_剥线钳编号
        public override string SecondToolUsed_DisplayName { get; protected set; } = "剥线钳编号";
        public override bool SecondToolUsed_Show { get; protected set; } = true;
        public override bool SecondToolUsed_Enable { get; protected set; } = true;
        public override int SecondToolUsed_Property { get; protected set; } = 2;
        #endregion
        #region A11_记录项目

        public override string RecordItem_DisplayName { get; protected set; } = "记录项目";
 
        public override bool RecordItem_Enable { get; protected set; } = true;

        public override bool RecordItem_Show { get; protected set; } = true;

        #endregion
        /// <summary>
        /// 记录要求
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="recordLocation">导线编号</param> 
        /// <returns></returns>
        public RecordRequirementsEntity SetRecordRequirements(RecordRequirementsEntity entity, string recordLocation)
        {
            entity.SetRecordLocation(recordLocation, "输出接口点号", false, true, 0);

            return entity;
        }
        /// <summary>
        /// 实测值
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="firstMeasuredValues"></param>
        /// <param name="secondMeasuredValues"></param>
        /// <param name="thirdMeasuredValues"></param>
        /// <param name="confirmResult"></param>
        /// <returns></returns>
        public MeasuredResultEntity SetMeasuredResult(MeasuredResultEntity entity, string secondMeasuredValues, string confirmResult)
        {
            entity.SetSecondMeasuredValues(secondMeasuredValues, "实测值", true, true, 0);
            entity.SetConfirmResult(confirmResult, "检查结果", true, true, 0);

            return entity;
        }
        /// <summary>
        /// 多媒体
        /// </summary>
        /// <param name="measuredValues"></param>
        public MultiMediaEntity SetMultiMedia(MultiMediaEntity entity, string photoNo)
        {
            entity.SetMultiMedia(photoNo, "多媒体", true, true, 0);
            return entity;
        }
        /// <summary>
        /// 确认人
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public InspectionSignatureEntity SetInspectionSignature(InspectionSignatureEntity entity)
        {
            entity.InspectionSignatureName = "二检";
            entity.SetFirstOperator(null, "记录人", true, true, 0, null, "记录人操作时间", true, true, 0);
            entity.SetSecondOperator(null, "确认人", true, true, 0, null, "确认人操作时间", true, true, 0);

            return entity;
        }

    }
}
